package com.zjy.service;

import com.zjy.dao.StudentMapper;
import com.zjy.pojo.Students;

import java.util.List;

public class StudentServiceImpl implements StudentService{
    private StudentMapper studentMapper;

    public void setStudentMapper(StudentMapper studentMapper) {
        this.studentMapper = studentMapper;
    }

    public int addStudent(Students students) {
        return studentMapper.addStudent(students);
    }

    public int deleteStudentById(int id) {
        return studentMapper.deleteStudentById(id);
    }

    public int updateStudent(Students students) {
        return studentMapper.updateStudent(students);
    }

    public Students queryStudentById(int id) {
        return studentMapper.queryStudentById(id);
    }

    public List<Students> queryAllStudent() {
        return studentMapper.queryAllStudent();
    }
}
